package cn.eli.vue.mapper.postAnswer;

import cn.eli.vue.entity.PostAnswer;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PostAnswerMapper {
    /*发布回答接口*/
    int AnswerPost(@Param("user_id") int user_id, @Param("postAsk_id") int postAsk_id, @Param("postAnswer_title") String postAnswer_title, @Param("postAnswer_discribe") String postAnswer_discribe,
                   @Param("postAnswer_img") String postAnswer_img);
    /*收藏回答*/
    int AnswerSubscribeInsert(@Param("user_id")int user_id, @Param("postAnswer_id")int postAnswer_id) ;
    /*收藏回答*/
    int AnswerSubscribeUpdate(@Param("user_id")int user_id, @Param("postAnswer_id")int postAnswer_id) ;
    /*取消点赞回答*/
    int AnswerSubscribeCancelDelete(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*取消点赞回答*/
    int AnswerSubscribeCancelUpdate(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*点赞回答*/
    int AnswerLikeInsert(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*点赞回答*/
    int AnswerLikeUpdate(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*取消点赞回答*/
    int AnswerLikeCancelDelete(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*取消点赞回答*/
    int AnswerLikeCancelUpdate(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id);
    /*评论回答*/
    int AnswerCommentInsert(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id,@Param("commentAnswer_discribe")String commentAnswer_discribe);
    /*评论回答*/
    int AnswerCommentUpdate(@Param("user_id")int user_id,@Param("postAnswer_id")int postAnswer_id,@Param("commentAnswer_discribe")String commentAnswer_discribe);
    /*修改回答*/
    int AnswerModify(@Param("user_id") int user_id, @Param("postAnswer_id")int postAnswer_id,@Param("postAnswer_title") String postAnswer_title, @Param("postAnswer_discribe") String postAnswer_discribe,
                      @Param("postAnswer_img") String postAnswer_img);
    /*获取所有问题*/
    List<PostAnswer> AllAnswer();
    /*获取某个问题下的所有回答*/
    List<PostAnswer> AllAnswerInAsk(@Param("postAsk_id")int postAsk_id);
    /*获取某个角色的所有回答*/
    List<PostAnswer> AllAnswerInUser(@Param("user_id")int user_id);
}
